import Layout from '@/layout/index.vue'

const asyncRoutes = [
  {
    path: '/timeCard',
    name: 'TimeCard',
    component: Layout,
    meta: {
      title: '时长卡管理',
      icon: 'nav-icon icon-timecard',
      resourceId: 'route:/web/timecard-management/',
    },
    children: [
      {
        path: '/timeCard/batchList',
        name: 'BatchList',
        component: () => import('@/views/timeCard/batchList'),
        meta: {
          title: '时长卡批次',
          resourceId: 'route:/web/timecard-management/batch/',
        },
      },
      {
        path: '/timeCard/batchAdd',
        name: 'BatchAdd',
        hidden: true,
        component: () => import('@/views/timeCard/batchAdd'),
        meta: {
          title: '新增时长卡',
          // resourceId: 'route:/web/timecard-management/batch/',
        },
      },
      {
        path: '/timeCard/timeCardList',
        name: 'TimeCardList',
        component: () => import('@/views/timeCard/timeCardList'), //todo
        meta: {
          title: '时长卡券码',
          resourceId: 'route:/web/timecard-management/timecard/',
        },
      },
      {
        path: '/timeCard/timeCardDetail/:integralId',
        name: 'TimeCardDetail',
        hidden: true,
        component: () => import('@/views/timeCard/timeCardDetail'),
        meta: {
          title: '时长卡券码详情',
          resourceId:
            'route:/web/timecard-management/timecard/timecard-detail/',
          activeMenu: '/timeCard',
          key: (route) => `${route.params.integralId}`,
        },
      },
    ],
  },
]
export default asyncRoutes
